home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / lib / partman / active_partition / 30format / choices next >
Encoding:
Text File  |  2009-04-19  |  673 b   |  35 lines

  1. #!/bin/sh
  2.  
  3. . /usr/share/debconf/confmodule
  4.  
  5. dev="$1"
  6. id=$2
  7. cd $dev
  8.  
  9. [ -f $id/method ] || exit 0
  10. method=$(cat $id/method)
  11. [ "$method" = keep -o "$method" = format ] || exit 0
  12.  
  13. [ -f $id/filesystem ] || exit 0
  14.  
  15. [ -f $id/existing -a -f $id/formatable ] || exit 0
  16.  
  17. if [ "$method" = format ]; then
  18.     db_metaget partman-basicmethods/text/yes_format description || RET=''
  19.     if [ "$RET" ]; then
  20.         status="$RET"
  21.     else
  22.         status=yes
  23.     fi
  24. else
  25.     db_metaget partman-basicmethods/text/no_dont_format description || RET=''
  26.     if [ "$RET" ]; then
  27.         status="$RET"
  28.     else
  29.         status=no
  30.     fi
  31. fi
  32.  
  33. db_metaget partman-basicmethods/text/format description
  34. printf "format\t%s\${!TAB}%s\n" "${RET}" "$status"
  35.